using System.Collections.Generic;
using System.Linq;
using UnityEngine;

[CreateAssetMenu(fileName = "Effect12-给自己设置目标的血量", menuName = "Skill/Effect/Effect12-给自己设置目标的血量", order = 12)]
public class Effect12 : EffectBase
{
    public override void Apply(Pair pair, GameEvent e, List<Chess> targets)
    {
        if(targets == null || targets.Count == 0) return;
        foreach (var target in targets)
        {
            pair.Chess.ChessDetail.Health = target.ChessDetail.Health;
            pair.Chess.ChessDetail.OriginalHp = target.ChessDetail.OriginalHp;
            pair.Chess.ChessDetail.ExtraHp = target.ChessDetail.ExtraHp;
        }
    }
}